//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import com.itheima.pinda.base.entity.SuperEntity.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel(
        value = "RoleOrgUpdateDTO",
        description = "角色组织关系"
)
public class RoleOrgUpdateDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键")
    @NotNull(
            message = "id不能为空",
            groups = {Update.class}
    )
    private Long id;
    @ApiModelProperty("角色ID")
    private Long roleId;
    @ApiModelProperty("组织ID")
    private Long orgId;

    public static RoleOrgUpdateDTO.RoleOrgUpdateDTOBuilder builder() {
        return new RoleOrgUpdateDTO.RoleOrgUpdateDTOBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public Long getRoleId() {
        return this.roleId;
    }

    public Long getOrgId() {
        return this.orgId;
    }

    public RoleOrgUpdateDTO setId(final Long id) {
        this.id = id;
        return this;
    }

    public RoleOrgUpdateDTO setRoleId(final Long roleId) {
        this.roleId = roleId;
        return this;
    }

    public RoleOrgUpdateDTO setOrgId(final Long orgId) {
        this.orgId = orgId;
        return this;
    }

    public RoleOrgUpdateDTO() {
    }

    public RoleOrgUpdateDTO(final Long id, final Long roleId, final Long orgId) {
        this.id = id;
        this.roleId = roleId;
        this.orgId = orgId;
    }

    @Override
    public String toString() {
        return "RoleOrgUpdateDTO(super=" + super.toString() + ", id=" + this.getId() + ", roleId=" + this.getRoleId() + ", orgId=" + this.getOrgId() + ")";
    }

    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof RoleOrgUpdateDTO)) {
            return false;
        } else {
            RoleOrgUpdateDTO other = (RoleOrgUpdateDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label47: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label47;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label47;
                    }

                    return false;
                }

                Object this$roleId = this.getRoleId();
                Object other$roleId = other.getRoleId();
                if (this$roleId == null) {
                    if (other$roleId != null) {
                        return false;
                    }
                } else if (!this$roleId.equals(other$roleId)) {
                    return false;
                }

                Object this$orgId = this.getOrgId();
                Object other$orgId = other.getOrgId();
                if (this$orgId == null) {
                    if (other$orgId != null) {
                        return false;
                    }
                } else if (!this$orgId.equals(other$orgId)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof RoleOrgUpdateDTO;
    }

    @Override
    public int hashCode() {
        /*int PRIME = true;*/
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $roleId = this.getRoleId();
        result = result * 59 + ($roleId == null ? 43 : $roleId.hashCode());
        Object $orgId = this.getOrgId();
        result = result * 59 + ($orgId == null ? 43 : $orgId.hashCode());
        return result;
    }

    public static class RoleOrgUpdateDTOBuilder {
        private Long id;
        private Long roleId;
        private Long orgId;

        RoleOrgUpdateDTOBuilder() {
        }

        public RoleOrgUpdateDTO.RoleOrgUpdateDTOBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public RoleOrgUpdateDTO.RoleOrgUpdateDTOBuilder roleId(final Long roleId) {
            this.roleId = roleId;
            return this;
        }

        public RoleOrgUpdateDTO.RoleOrgUpdateDTOBuilder orgId(final Long orgId) {
            this.orgId = orgId;
            return this;
        }

        public RoleOrgUpdateDTO build() {
            return new RoleOrgUpdateDTO(this.id, this.roleId, this.orgId);
        }

        @Override
        public String toString() {
            return "RoleOrgUpdateDTO.RoleOrgUpdateDTOBuilder(id=" + this.id + ", roleId=" + this.roleId + ", orgId=" + this.orgId + ")";
        }
    }
}
